package com.firewolf.springboot.controller;

import java.net.URL;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.firewolf.springboot.conf.MySelf1;
import com.firewolf.springboot.conf.MySelf2;
import com.firewolf.springboot.prop.DsProperties;

@RestController
public class TestController implements EnvironmentAware {
	@Autowired
	private DsProperties dsP;
	
	@Autowired
	private MySelf1 self1;
	
	@Autowired
	private MySelf2 self2;

	@RequestMapping("/test")
	public String test() {
		System.out.println(dsP);
		System.out.println(self1);
		System.out.println(self2);
		return "zhangsan";
	}

	@Override
	public void setEnvironment(Environment environment) {
		System.out.println("这是在控制器里面访问环境信息");
	}
}
